]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-global: Ignore modal operations if we have no compositor
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 2 Oct 2019 19:56:05 +0000 (21:56 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 8 Oct 2019 15:51:52 +0000 (17:51 +0200)
Modal dialog actions might be triggered during display closing, and in such
cases we should just ignore the requests.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/746

src/shell-global.c

index 7f74a34fd8107a51642662c8b442f342fb4a1083..77e167c1079fafd1d3df283a2d4d65efaad174f9 100644 (file)
@@ -943,6 +943,9 @@ shell_global_begin_modal (ShellGlobal       *global,
                           guint32           timestamp,
                           MetaModalOptions  options)
 {
+  if (!meta_display_get_compositor (global->meta_display))
+    return FALSE;
+
   /* Make it an error to call begin_modal while we already
    * have a modal active. */
   if (global->has_modal)
@@ -964,6 +967,9 @@ void
 shell_global_end_modal (ShellGlobal *global,
                         guint32      timestamp)
 {
+  if (!meta_display_get_compositor (global->meta_display))
+    return;
+
   if (!global->has_modal)
     return;